#ifndef __BSP_H
#define __BSP_H

#include "define_all.h"

//mybsp
#include "bsp_protocol.h"
#include "bsp_led.h"
#include "bsp_usart.h"
#include "bsp_timer.h"
#include "bsp_debug.h"
#include "bsp_i2c.h"
#include "bsp_at24cxx.h"
#include "bsp_adc.h"
#include "bsp_spi.h"
#include "bsp_w25qxx.h"
#include "bsp_rtc.h"
#include "bsp_sleep.h"
#include "bsp_lptimer.h"
#include "bsp_trng.h"
#include "bsp_gpio.h"
//#include "bsp_modbus.h"
#include "bsp_nb.h"
#include "bsp_meter.h"
#include "bsp_user_lib.h"
#include "bsp_systick.h"
//#include "bsp_key.h"
#include "bsp_rs485.h"
#include "modbus_host.h"

#define TEST_CODE  1


enum Protocol
{
	coap = 0x00,
	udp = 0x04,
	tcp = 0x08
};

enum Operator
{
	telecom = 0x00,
	mobile = 0x01,
	unicom = 0x10
};

enum _Main_Status
{
	State_Init  = 0,
	State_NB    = 1,
	State_Meter = 2,
	State_Sleep = 3
};

void bsp_Init(void);
void bsp_Idle(void);

void bsp_RunPer10ms(void);
void bsp_RunPer1ms(void);

extern u8 Maintask_Status;

#endif


